<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理后台</title>
<link href="Css/css.css" rel="stylesheet" type="text/css" />
<link href="Css/default1.css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="Js/fileprogress.js"></script>
<script type="text/javascript" src="Js/handlers.js"></script>
<script type="text/javascript" src="../_Shared/editor/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="../_Shared/editor/ckeditor/ckfinder/ckfinder.js"></script>
<script language="javascript" type="text/javascript">
<!--
function fnOnBack() {
	var url = '<?php echo url('BoDashboard', 'Welcome'); ?>';
	document.location.href = url;
}

function fnOnSubmit(form) {
	form.Save.disabled = true;
	if (form.title.value == '')
	{
		alert('请填写产品名称');
		form.Save.disabled = false;
		return false;
	}
	if (form.pcid.value == 0)
	{
		alert('请选择产品类别');
		form.Save.disabled = false;
		return false;
	}

	return true;
}

// -->
</script>
<style type="text/css">
<!--
body {
	background-color: #ddeef2;
}
-->
</style>
</head>

<body>
<div id="main_title"><a href="#">后台管理中心</a>—资讯发布</div>
<div id="main_content">
  <form action="<?php echo $this->_url('save',array('catid' => $catid,'access' => $_REQUEST['access'])); ?>" method="post" enctype="multipart/form-data" name="form1" id="form1" onsubmit="return fnOnSubmit(this);">
   <table width="100%" border="0" cellspacing="2" cellpadding="2">
		<tr>
		  <td width="17%" class="title">*资讯名称</td>
		  <td><input type="text" name="title" id="title" class="wp80" value="<?php echo $article['title']; ?>"/></td>
	    </tr>
        <tr>
		  <td class="title">*所属类别</td>
	      <td>
		  <table border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td>			  
		    <select name="pcid" size="1" id="pcid">
		    <option value="0">--请选择--</option>
			<?php
			$right = array();
			if (isset($article['pcid'])) {
				$selectedClasses = (array)$article['pcid'];
			} else {
				$selectedClasses = array();
			}
			foreach ($pclasses as $class):
		        $c = count($right);
				if ($c > 0) {
					while ($c > 0 &&
		                $right[$c - 1] < $class['right_value'])
		            {
						array_pop($right);
						$c = count($right);
					}
				}
		        $className = str_repeat('  ', $c) . $class['name'] . '      ';
				$right[] = $class['right_value'];
			?>
	<option value="<?php echo $class['class_id']; ?>"<?php if (in_array($class['class_id'], $selectedClasses)): ?>selected<?php endif; ?>><?php echo t($className); ?></option>
	<?php endforeach; ?>
    </select></td>
            </tr>
          </table>		  </td>
	  	</tr>
        <tr>
		  <td class="title">图片</td>
		  <td><?php if($article['image_src']): ?><img src="<?php echo LEADTONE_DIR;?>/Upload/<?php echo $article['image_src']; ?>"><br /><?php endif; ?><input name="postfile" type="file" size="40" /></td>
	    </tr>
		<tr>
		  <td width="17%" class="title">*视频名称</td>
		  <td><input type="text" name="ext1" id="ext1" class="wp80" value="<?php echo $article['ext1']; ?>"/></td>
	    </tr>
        <tr>
		  <td valign="top" class="title">排序</td>
		  <td><input style="width:30px;" name="hot" id="hot" type="text" value="<?php echo $article['hot']; ?>"/>只能填0-99的正整数，值越大排名越靠前</td>
		</tr>
		<tr>
		  <td align="right" colspan="2">
              <button type="submit" name="Save" id="Save" class="btnA">发布</button>  
              <input name="Cancel" type="button" id="Cancel" value="<?php echo h(_T('ui_g_cancel')); ?>" onclick="fnOnBack();" />          </td>
	    </tr>
		<tr>
		  <td>&nbsp;</td>
		  <td></td>
		</tr>
	</table>
    <input name="class_id" type="hidden" id="class_id" value="<?=$class_id?>"/>
	<input name="<?php echo $pk; ?>" type="hidden" id="<?php echo $pk; ?>" value="<?php echo $article[$pk]; ?>"/>
  </form>
</div>
<div id="main_copy">Copyright&copy;2003 – 2009 ITeam Monkey. All Rights Reserved ITeam Monkey 版权所有 </div>
<script type="text/javascript">
if ( typeof CKEDITOR == 'undefined' ){
	document.write(
		'<strong><span style="color: #ff0000">Error</span>: CKEditor not found</strong>.' +
		'This sample assumes that CKEditor (not included with CKFinder) is installed in' +
		'the "/ckeditor/" path. If you have it installed in a different place, just edit' +
		'this file, changing the wrong paths in the &lt;head&gt; (line 5) and the "BasePath"' +
		'value (line 32).' ) ;
}else{
	var editor = CKEDITOR.replace( 'spaw1' );
	CKFinder.SetupCKEditor( editor, '../_Shared/editor/ckeditor/ckfinder/' ) ;
}
</script>
</body>
</html>
